import { Button, Text, View } from "react-native";

export default function App() {
  return (
    <View>
      <Text>=========</Text>
      <Child>
        <Button title='父亲的按钮1' />
      </Child>
      <Child>
        <Button title='父亲的按钮2' />
      </Child>
      <Text>==========</Text>
    </View>
  );
}


// 子组件
function Child({ children }: { children: React.ReactNode }) {
  return (
    <View>
      <Text>子组件**</Text>
      {/* 使用插槽 */}
      {children}
      <Text>子组件**</Text>
    </View>
  )
}